<!--
 * @FilePath     : /jquery/demo/101-10.html
 * @Description  : 不修改 target 对象
 * @Date         : 2025-03-26 17:29:34
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-03-26 17:38:11
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <h2>jq 服务静态页</h2>

    <script src="/library/jquery.min.js"></script>
    <script src="/common/common.js"></script>
    <script>
      var empty = {}
      var defaults = { validate: false, limit: 5, name: 'foo' }
      var options = { validate: true, name: 'bar' }

      var result = jQuery.extend(empty, defaults, options)

      console.log(1, result) // { validate: true, limit: 5, name: 'bar' }
      console.log(2, empty) // { validate: true, limit: 5, name: 'bar' }
      console.log(3, defaults) // { validate: false, limit: 5, name: 'foo' } （这个不变更）
      console.log(4, options) // { validate: true, name: 'bar' }
      console.log(5, empty === result) // true
    </script>
  </body>
</html>
